Skip to content

fix(domain): validate the tokens of the 3gpp-lac-ci location string - #9

Draft
pjeweb wants to merge 1 commit into
osb/pr/fuzz-property-testsfrom
osb/pr/lac-ci-token-validation
Draft

pjeweb wants to merge 1 commit into
osb/pr/fuzz-property-testsfrom
osb/pr/lac-ci-token-validation

Conversation

@pjeweb

@pjeweb pjeweb commented Nov 22, 2026

Copy link
Copy Markdown

decode3gppLacCi only checked that a location string had five tokens and that MCC, MNC and cell id were not empty, so abc,x,zz,not-hex,q came back as a cell. The code's own comment says a wrong cell id is worse than a missing one.

  • MCC must be three digits, MNC two or three, and cell id hex of at most 64 bits; LAC and TAC must be hex or empty (a 2G or 3G attach has no TAC, which the existing test keeps).
  • Anything else decodes to nothing, the same as a wrong token count.
  • Tests for the rejected shapes and a property that accepted values have the shape ModemManager prints.

The new tests fail on main. Sits on the property test PR.

decode3gppLacCi only checked the token count and that three tokens were non-empty, so values like abc,x,zz,not-hex,q came back as a cell. MCC must now be three digits, MNC two or three, and LAC, CI and TAC hex of at most 64 bits (an empty LAC or TAC is still allowed). Anything else decodes to nothing, as a wrong cell id is worse than a missing one.
@pjeweb pjeweb added upstream: waits for intent Needs an issue or maintainer agreement before an upstream proposal. stacked Depends on another pull request; review and integrate parents first. parked Parked or held for now; not planned for a train until picked up again. labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parked Parked or held for now; not planned for a train until picked up again. stacked Depends on another pull request; review and integrate parents first. upstream: waits for intent Needs an issue or maintainer agreement before an upstream proposal.

Development

Successfully merging this pull request may close these issues.

1 participant